// File:			R3.h
// Authors:			Richard Burris, Joshua Douty
// Purpose:			R3 header file
// Version:        	1.0
// Date:			11/03/2011

//#include "mpx_supt.h"
//#include "R1.h"
//#include "R2.h"
//#include "R3.h"
//#include "R4.h"
//#include "R6.h"
//#include "COMHAND.h"

#include <dos.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>


#define SYS_STACK_SIZE 4096

#define NAMESIZE 10 //max name size for a process name


#define IDLE	0
#define	READ	1
#define	WRITE	2
#define CLEAR	3
#define GOTOXY	4
#define EXIT	5
#define APPLICATION 1


typedef struct params{
	int op_code;		//operation code, IDLE, EXIT, READ, WRITE, etc
	int device_id;		//TERMINAL, COM_PORT
	unsigned char *buf_addr;		//Buffer address.  An unsigned char
	int *count_addr;	//size of the buffer
}params;

typedef context thecon;
typedef thecon* context_Pointer;

void interrupt sys_call();
void interrupt dispatch();
void R3_init();

//temp functions
//void loadPCB(char arg);

//temp commands
void calldispatch(char arg);
void loadCOMHAN();
//void loadProcess(char arg);
void test1_R3(void);
void test2_R3(void);
void test3_R3(void);
void test4_R3(void);
void test5_R3(void);
